#region Using Statements
using Microsoft.Xna.Framework;
using PFAGame;
#endregion

namespace PFAGame
{
    /// <summary>
    /// The main menu screen is the first thing displayed when the game starts up.
    /// </summary>
    class GameModeMenuScreen : MenuScreen
    {
        #region Initialization

        /// <summary>
        /// Constructor fills in the menu contents.
        /// </summary>
        public GameModeMenuScreen()
            : base("Game Mode")
        {
            // Create our menu entries.
            MenuEntry storyGameMenuEntry = new MenuEntry("Story Mode");
            MenuEntry arcadeGameMenuEntry = new MenuEntry("Survival Mode");
            MenuEntry exitMenuEntry = new MenuEntry("Return");

            // Hook up menu event handlers.
            storyGameMenuEntry.Selected += StoryGameMenuEntrySelected;
            arcadeGameMenuEntry.Selected += ArcadeGameMenuEntrySelected;
            exitMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(storyGameMenuEntry);
            MenuEntries.Add(arcadeGameMenuEntry);
            MenuEntries.Add(exitMenuEntry);
        }

        #endregion

        #region Handle Input

        /// <summary>
        /// Event handler for when the Play Game menu entry is selected.
        /// </summary>
        void StoryGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            ScreenManager.Singleton.AddScreen(new StoryMenuScreen(), e.PlayerIndex);
        }

        void ArcadeGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            ScreenManager.Singleton.AddScreen(new ArcadeMenuScreen(), e.PlayerIndex);
        }

        #endregion
    }
}
